// history.ts
// const util = require('../../utils/util.js')
// import { formatTime } from '../../utils/util'

Component({
  data: {
    history:[],
  },
  methods:{
    onLoad(){
      let historyCache = wx.getStorageSync('history') || [];
      this.setData({
        history:historyCache,
      })
    },
    gotoResultWithHistory(event:any){
      const index = event.currentTarget.dataset.index;
      wx.navigateTo({
        url: '/pages/result/result?history='+index,
      })
    }
  },
  lifetimes: {
    attached() {
    }
  },
})
